import Vue from 'vue'
import Router from 'vue-router'
import UserLayout from '@/components/UserLayout'
import Login from '@/components/Login'
import Register from '@/components/Register'
import MeiRongMeiFaLayout from '@/components/MeiRongMeiFaLayout'
import YuYueLayout from '@/components/YuYueLayout'
Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'UserLayout',
    //   component: UserLayout,
    // },
    {
      path: '/',
            name: 'Login',
      component: Login,
      // component: () => import('@/components/Login'),
    },
    {
      path: '/register',
            name: 'Register',
      component: Register,
      // component: () => import('@/components/Login'),
    },
    {
      path: "/userguanli", // 部门菜单信息父路由
      component: UserLayout,
      children: [
        {
          path: 'shouye',
          component: () => import('@/components/ShouYe'),
          meta: { title: '首页', icon: 'table' }
        },
        {
          path: 'gerenxinxi',
          component: () => import('@/components/GeRenXinXi'),
          meta: { title: '个人信息', icon: 'table' }
        },{
          path: 'meirongmeifalayout',
          component: () => import('@/components/MeiRongMeiFaLayout'),
          meta: { title: '个人信息', icon: 'table' }
        },
        {
          path: '/guanli',
          name: 'MeiRongMeiFaLayout',
          component:MeiRongMeiFaLayout,
          children: [
            {
              path: 'firstmeirong',
              component: () => import('@/components/FirstMeiRong'),
              meta: { title: '初级美容', icon: 'table' }
            },
            {
              path: 'secondmeirong',
              component: () => import('@/components/SecondMeiRong'),
              meta: { title: '中级美容', icon: 'table' }
            },
            {
              path: 'thirdmeirong',
              component: () => import('@/components/ThirdMeiRong'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'firstmeifa',
              component: () => import('@/components/FirstMeiFa'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'secondmeifa',
              component: () => import('@/components/SecondMeiFa'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'thirdmeifa',
              component: () => import('@/components/ThirdMeiFa'),
              meta: { title: '高级美容', icon: 'table' }
            },
          ],
        },
        {
          path: 'huiyuanka',
          component: () => import('@/components/HuiYuanKa'),
          meta: { title: '会员卡', icon: 'table' }
        },
        {
          path: 'yuyuelayout',
          component: () => import('@/components/YuYueLayout'),
          meta: { title: '预约管理', icon: 'table' }
        },{
          path: '/yyguanli',
          name: 'YuYueLayout',
          component:YuYueLayout,
          children: [
            {
              path: 'firstmeirongyuyue',
              component: () => import('@/components/FirstMeiRongYuYue'),
              meta: { title: '初级美容', icon: 'table' }
            },
            {
              path: 'secondmeirongyuyue',
              component: () => import('@/components/SecondMeiRongYuYue'),
              meta: { title: '中级美容', icon: 'table' }
            },
            {
              path: 'thirdmeirongyuyue',
              component: () => import('@/components/ThirdMeiRongYuYue'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'firstmeifayuyue',
              component: () => import('@/components/FirstMeiFaYuYue'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'subscribeinfo',
              component: () => import('@/components/SubscribeInfo'),
              meta: { title: '预约信息', icon: 'table' }
            },{
              path: 'recommend',
              component: () => import('@/components/Recommend'),
              meta: { title: '推荐信息', icon: 'table' }
            },{
              path: 'promotion',
              component: () => import('@/components/Promotion'),
              meta: { title: '促销信息', icon: 'table' }
            },{
              path: 'secondmeifayuyue',
              component: () => import('@/components/SecondMeiFaYuYue'),
              meta: { title: '高级美容', icon: 'table' }
            },{
              path: 'thirdmeifayuyue',
              component: () => import('@/components/ThirdMeiFaYuYue'),
              meta: { title: '高级美容', icon: 'table' }
            },
          ],}
      ]
    }
  ]
})
